<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>mechanism (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">storage.mechanism</span>
</div>

<hr/>


  <h2>Classes</h2>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_ErrorHandlingMechanism.html">
          goog.storage.mechanism.ErrorHandlingMechanism</a><br/>
        <div class="class-details">Wraps a storage mechanism with a custom error handler.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_HTML5LocalStorage.html">
          goog.storage.mechanism.HTML5LocalStorage</a><br/>
        <div class="class-details">Provides a storage mechanism that uses HTML5 local storage.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_HTML5MockStorage.html">
          goog.storage.mechanism.HTML5MockStorage</a><br/>
        <div class="class-details">Provides an HTML5WebStorage wrapper for MockThrowableStorage.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_HTML5SessionStorage.html">
          goog.storage.mechanism.HTML5SessionStorage</a><br/>
        <div class="class-details">Provides a storage mechanism that uses HTML5 session storage.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_HTML5WebStorage.html">
          goog.storage.mechanism.HTML5WebStorage</a><br/>
        <div class="class-details">Provides a storage mechanism that uses HTML5 Web storage.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_IEUserData.html">
          goog.storage.mechanism.IEUserData</a><br/>
        <div class="class-details">Provides a storage mechanism using IE userData.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_IterableMechanism.html">
          goog.storage.mechanism.IterableMechanism</a><br/>
        <div class="class-details">Interface for all iterable storage mechanisms.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_Mechanism.html">
          goog.storage.mechanism.Mechanism</a><br/>
        <div class="class-details">Basic interface for all storage mechanisms.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_MockThrowableStorage.html">
          goog.storage.mechanism.MockThrowableStorage</a><br/>
        <div class="class-details">A minimal WebStorage implementation that throws exceptions for disabled
storage. Since we cannot have unit tests running in Safari private mode to
test this, we need to mock an exception throwing when trying to set a value.

</div>
 </div>
 <div class="fn-constructor">
        <a href="class_goog_storage_mechanism_PrefixedMechanism.html">
          goog.storage.mechanism.PrefixedMechanism</a><br/>
        <div class="class-details">Wraps an iterable storage mechanism and creates artificial namespaces.

</div>
 </div>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>



<h2>Enumerations</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.ErrorCode"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">ErrorCode</span>
        : 
     </div>


     <div class="entryOverview">
       Errors thrown by storage mechanisms.

     </div>

     <div class="entryDetails">
       <div class="detailsSection">
          <b>Constants:</b>
          <table class="horiz-rule">
            <tbody>
              <tr><td>
                <span class="entryName">
                  INVALID_VALUE
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  QUOTA_EXCEEDED
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  STORAGE_DISABLED
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
           </tbody>
         </table>
       </div>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_errorcode.js.source.html#line27">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>







  <h2>Global Properties</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.ErrorHandlingMechanismTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">ErrorHandlingMechanismTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_errorhandlingmechanism_test.js.source.html#line15">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.HTML5LocalStorageTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">HTML5LocalStorageTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_html5localstorage_test.js.source.html#line15">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.HTML5SessionStorageTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">HTML5SessionStorageTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_html5sessionstorage_test.js.source.html#line15">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.HTML5WebStorageTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">HTML5WebStorageTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_html5webstorage_test.js.source.html#line17">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.IEUserDataTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">IEUserDataTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_ieuserdata_test.js.source.html#line15">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.PrefixedMechanismTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">PrefixedMechanismTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_prefixedmechanism_test.js.source.html#line15">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.iterableMechanismTester"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">iterableMechanismTester</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_iterablemechanismtester.js.source.html#line23">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.mechanismSeparationTester"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">mechanismSeparationTester</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_mechanismseparationtester.js.source.html#line25">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.mechanismSharingTester"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">mechanismSharingTester</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_mechanismsharingtester.js.source.html#line25">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.mechanismTester"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">mechanismTester</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_mechanismtester.js.source.html#line23">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.mechanismfactory"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">mechanismfactory</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_mechanismfactory.js.source.html#line21">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.storage.mechanism.mechanismfactoryTest"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.storage.mechanism.</span><span class="entryName">mechanismfactoryTest</span>
        : 
     </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_storage_mechanism_mechanismfactory_test.js.source.html#line15">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package storage</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="storage.mechanism"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
